package cn.itsource.itsource.controller;

import cn.itsource.itsource.domain.ShopDto;
import cn.itsource.itsource.query.LinYuQuery;
import cn.itsource.itsource.query.ShopQuery;
import cn.itsource.itsource.util.AjaxResult;
import cn.itsource.itsource.service.IShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/shop")
public class ShopController {
  @Autowired
   private IShopService shopService;

   @PostMapping("/register")
    public AjaxResult register(@RequestBody ShopDto shopDto){

        return shopService.register(shopDto);

    }

    @PostMapping("/pagelist")
    @ResponseBody
    public AjaxResult pageList(@RequestBody ShopQuery query){

        return shopService.pageList(query);

    }
}
